Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: unpack TypeVars before subtyping with Union #11805

Closed
wants to merge 1 commit into from

Conversation

timholy
Copy link
Member

@timholy timholy commented Jun 21, 2015

Someday this will fix #11803 and #11015, but as it stands this exposes an error in inference than can be triggered by make test-replutil.

@timholy
Copy link
Member Author

timholy commented Jun 22, 2015

Hmm, the Travis logs are very slow to show up here. The failing test can be replicated with

julia> type Test_type end

julia> test_type = Test_type()
Test_type()

julia> Base.show_method_candidates(IOBuffer(), MethodError(getindex,(test_type, 1,1)))
ERROR: MethodError: `ndims` has no method matching ndims(::TypeVar)
 in show_delim_array at ./show.jl:200
 in show_delim_array at show.jl:189
 in show_method_candidates at replutil.jl:224
 in eval at no fileSYSTEM: show(lasterr) caused an error

So clearly stuff is pretty borked.

@vtjnash vtjnash added this to the 0.4.x milestone Jul 31, 2015
@timholy
Copy link
Member Author

timholy commented Aug 1, 2015

I stumbled across this and happened to notice that @vtjnash just added this to the 0.4 milestones. To explain a bit further, @JeffBezanson I think there's a chance this might actually achieve some of your goals for UnionAll in #8974---if you unpack TypeVars first, then I think Union-logic should work in a wider range of contexts.

But currently I lack the time to pursue this further; if this is really up for 0.4, I'm afraid someone else will have to look into this more deeply.

@tkelman
Copy link
Contributor

tkelman commented May 12, 2016

Is this still relevant?

edit: covered by #8974, Jeff says?

@tkelman tkelman closed this May 12, 2016
@vtjnash vtjnash reopened this May 12, 2016
@timholy
Copy link
Member Author

timholy commented May 12, 2016

It's definitely covered in #8974, but if that's a release or two away it could still be relevant. Would take some time to polish up, however.

@ViralBShah ViralBShah modified the milestones: 0.4.x, 0.6.0 Sep 10, 2016
@JeffBezanson
Copy link
Member

Covered by #18457.

@timholy timholy deleted the teh/subtype_typevar_union branch October 18, 2016 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subtype broken for TypeVar with Union
5 participants